package com.gomore.opple.module.order;

import com.gomore.opple.R;
import com.gomore.opple.module.BaseActivity;

import javax.inject.Inject;

/**
 * Created by asus on 2017/5/9.
 */
public class OrderActivity extends BaseActivity {
    @Inject
    OrderPresenter orderPresenter;

    private OrderFragment orderFragment;

    @Override
    protected void initalizeViewData() {
        super.initalizeViewData();
    }

    @Override
    protected void initalizeViews() {
        if (orderFragment == null) {
            orderFragment = OrderFragment.getInstance();
            replaceFragment(orderFragment, false, "order_view");
        }
    }

    @Override
    protected void initializeDependencyInjector() {
        DaggerOrderComponent.builder()
                .dataRepositoryComponent(getRepositoryComponent())
                .orderPresenterModule((new OrderPresenterModule(orderFragment)))
                .build()
                .inject(this);
    }

    @Override
    protected int getLayoutView() {
        return R.layout.activity_order;
    }

}
